.class public abstract Lcom/a0soft/gphone/aSys/a;
.super Ljava/lang/Object;
.source "PriorityAsyncTask.java"


# static fields
.field private static final a:Ljava/util/concurrent/BlockingQueue;

.field private static final b:Ljava/util/concurrent/ThreadFactory;

.field private static final c:Ljava/util/concurrent/ThreadPoolExecutor;

.field private static final d:Lcom/a0soft/gphone/aSys/f;


# instance fields
.field private final e:Lcom/a0soft/gphone/aSys/i;

.field private final f:Ljava/util/concurrent/FutureTask;

.field private volatile g:Lcom/a0soft/gphone/aSys/h;


# direct methods
.method static constructor <clinit>()V
    .locals 8

    .prologue
    .line 27
    new-instance v0, Ljava/util/concurrent/LinkedBlockingQueue;

    const/16 v1, 0xa

    invoke-direct {v0, v1}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>(I)V

    sput-object v0, Lcom/a0soft/gphone/aSys/a;->a:Ljava/util/concurrent/BlockingQueue;

    .line 30
    new-instance v0, Lcom/a0soft/gphone/aSys/b;

    invoke-direct {v0}, Lcom/a0soft/gphone/aSys/b;-><init>()V

    sput-object v0, Lcom/a0soft/gphone/aSys/a;->b:Ljava/util/concurrent/ThreadFactory;

    .line 39
    new-instance v0, Ljava/util/concurrent/ThreadPoolExecutor;

    const/4 v1, 0x5

    const/16 v2, 0x80

    const-wide/16 v3, 0x1

    sget-object v5, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    sget-object v6, Lcom/a0soft/gphone/aSys/a;->a:Ljava/util/concurrent/BlockingQueue;

    sget-object v7, Lcom/a0soft/gphone/aSys/a;->b:Ljava/util/concurrent/ThreadFactory;

    invoke-direct/range {v0 .. v7}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V

    sput-object v0, Lcom/a0soft/gphone/aSys/a;->c:Ljava/util/concurrent/ThreadPoolExecutor;

    .line 47
    new-instance v0, Lcom/a0soft/gphone/aSys/f;

    invoke-direct {v0}, Lcom/a0soft/gphone/aSys/f;-><init>()V

    sput-object v0, Lcom/a0soft/gphone/aSys/a;->d:Lcom/a0soft/gphone/aSys/f;

    return-void
.end method

.method public constructor <init>()V
    .locals 2

    .prologue
    .line 81
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 52
    sget-object v0, Lcom/a0soft/gphone/aSys/h;->a:Lcom/a0soft/gphone/aSys/h;

    iput-object v0, p0, Lcom/a0soft/gphone/aSys/a;->g:Lcom/a0soft/gphone/aSys/h;

    .line 82
    new-instance v0, Lcom/a0soft/gphone/aSys/c;

    invoke-direct {v0, p0}, Lcom/a0soft/gphone/aSys/c;-><init>(Lcom/a0soft/gphone/aSys/a;)V

    iput-object v0, p0, Lcom/a0soft/gphone/aSys/a;->e:Lcom/a0soft/gphone/aSys/i;

    .line 90
    new-instance v0, Lcom/a0soft/gphone/aSys/d;

    iget-object v1, p0, Lcom/a0soft/gphone/aSys/a;->e:Lcom/a0soft/gphone/aSys/i;

    invoke-direct {v0, p0, v1}, Lcom/a0soft/gphone/aSys/d;-><init>(Lcom/a0soft/gphone/aSys/a;Ljava/util/concurrent/Callable;)V

    iput-object v0, p0, Lcom/a0soft/gphone/aSys/a;->f:Ljava/util/concurrent/FutureTask;

    .line 124
    return-void
.end method

.method static synthetic a(Lcom/a0soft/gphone/aSys/a;)V
    .locals 0
    .parameter

    .prologue
    .line 20
    invoke-direct {p0}, Lcom/a0soft/gphone/aSys/a;->f()V

    return-void
.end method

.method static synthetic d()Lcom/a0soft/gphone/aSys/f;
    .locals 1

    .prologue
    .line 20
    sget-object v0, Lcom/a0soft/gphone/aSys/a;->d:Lcom/a0soft/gphone/aSys/f;

    return-object v0
.end method

.method private e()Z
    .locals 1

    .prologue
    .line 215
    iget-object v0, p0, Lcom/a0soft/gphone/aSys/a;->f:Ljava/util/concurrent/FutureTask;

    invoke-virtual {v0}, Ljava/util/concurrent/FutureTask;->isCancelled()Z

    move-result v0

    return v0
.end method

.method private f()V
    .locals 1

    .prologue
    .line 349
    invoke-direct {p0}, Lcom/a0soft/gphone/aSys/a;->e()Z

    .line 350
    invoke-virtual {p0}, Lcom/a0soft/gphone/aSys/a;->c()V

    .line 352
    sget-object v0, Lcom/a0soft/gphone/aSys/h;->c:Lcom/a0soft/gphone/aSys/h;

    iput-object v0, p0, Lcom/a0soft/gphone/aSys/a;->g:Lcom/a0soft/gphone/aSys/h;

    .line 353
    return-void
.end method


# virtual methods
.method protected varargs abstract a()Ljava/lang/Object;
.end method

.method protected varargs a([Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 193
    return-void
.end method

.method public final varargs b([Ljava/lang/Object;)Lcom/a0soft/gphone/aSys/a;
    .locals 2
    .parameter

    .prologue
    .line 307
    iget-object v0, p0, Lcom/a0soft/gphone/aSys/a;->g:Lcom/a0soft/gphone/aSys/h;

    sget-object v1, Lcom/a0soft/gphone/aSys/h;->a:Lcom/a0soft/gphone/aSys/h;

    if-eq v0, v1, :cond_0

    .line 308
    sget-object v0, Lcom/a0soft/gphone/aSys/e;->a:[I

    iget-object v1, p0, Lcom/a0soft/gphone/aSys/a;->g:Lcom/a0soft/gphone/aSys/h;

    invoke-virtual {v1}, Lcom/a0soft/gphone/aSys/h;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    .line 319
    :cond_0
    sget-object v0, Lcom/a0soft/gphone/aSys/h;->b:Lcom/a0soft/gphone/aSys/h;

    iput-object v0, p0, Lcom/a0soft/gphone/aSys/a;->g:Lcom/a0soft/gphone/aSys/h;

    .line 321
    invoke-virtual {p0}, Lcom/a0soft/gphone/aSys/a;->b()V

    .line 323
    iget-object v0, p0, Lcom/a0soft/gphone/aSys/a;->e:Lcom/a0soft/gphone/aSys/i;

    iput-object p1, v0, Lcom/a0soft/gphone/aSys/i;->c:[Ljava/lang/Object;

    .line 324
    sget-object v0, Lcom/a0soft/gphone/aSys/a;->c:Ljava/util/concurrent/ThreadPoolExecutor;

    iget-object v1, p0, Lcom/a0soft/gphone/aSys/a;->f:Ljava/util/concurrent/FutureTask;

    invoke-virtual {v0, v1}, Ljava/util/concurrent/ThreadPoolExecutor;->execute(Ljava/lang/Runnable;)V

    .line 326
    return-object p0

    .line 310
    :pswitch_0
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "Cannot execute task: the task is already running."

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 313
    :pswitch_1
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "Cannot execute task: the task has already been executed (a task can be executed only once)"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 308
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method protected b()V
    .locals 0

    .prologue
    .line 163
    return-void
.end method

.method protected c()V
    .locals 0

    .prologue
    .line 179
    return-void
.end method

.method protected final varargs c([Ljava/lang/Object;)V
    .locals 3
    .parameter

    .prologue
    .line 343
    sget-object v0, Lcom/a0soft/gphone/aSys/a;->d:Lcom/a0soft/gphone/aSys/f;

    const/4 v1, 0x2

    new-instance v2, Lcom/a0soft/gphone/aSys/g;

    invoke-direct {v2, p0, p1}, Lcom/a0soft/gphone/aSys/g;-><init>(Lcom/a0soft/gphone/aSys/a;[Ljava/lang/Object;)V

    invoke-virtual {v0, v1, v2}, Lcom/a0soft/gphone/aSys/f;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;

    move-result-object v0

    invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V

    .line 345
    return-void
.end method
